﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EntityObjects;
using BAL.Controller;
using PresentationLayer.Reports;

namespace PresentationLayer.View.Reports
{
    public partial class Print_DeptConsumption : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
          string m1 = Request.QueryString["m1"].ToString();
          string dept = Request.QueryString["dept"].ToString();
            DS_DepConsumption ds = new DS_DepConsumption();
            PresentationLayer.Reports.DS_DepConsumptionTableAdapters.ConsumptionTableAdapter ta = new PresentationLayer.Reports.DS_DepConsumptionTableAdapters.ConsumptionTableAdapter();
            ta.Fill(ds.Consumption,dept,Convert.ToDecimal(m1));
            PresentationLayer.Reports.Report_DeptConsumption rep = new PresentationLayer.Reports.Report_DeptConsumption();
            rep.SetDataSource(ds);
            CrystalReportViewer6.ReportSource = rep;
            CrystalReportViewer6.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None;
         
        }

      
    }
}